---
title: Development
sidebar_position: 16
---

# Development

All NiiVue development is public on GitHub. The `main` branch represents the most current state of NiiVue. Contributions to NiiVue are encouraged and welcomed. 

## Local Development

The hot-reloadable web page is the most responsive way to test and develop new features in NiiVue. Whenever any core source files are modified, the page at /niivue/packages/niivue/src/index.html automatically reloads to reflect those changes. You can edit this index.html file to load specific datasets or create custom examples that demonstrate new functionality or reproduce issues.

```
git clone git@github.com:niivue/niivue.git
cd niivue
npm install
npm run dev
```

The [API documentation](https://niivue.com/docs/api/niivue/classes/Niivue) provides many live demos as recipes to illustrate the functionality. If you want to modify these demos, you can run them (though note that this mode is not hot-reloadable so you will have to re-run `npm run demo` after changing the core code).

```
git clone git@github.com:niivue/niivue.git
cd niivue
npm install
npm run demo
```

## Documentation Development

The [primary documentation](https://niivue.com/docs/) uses [Docusaurus](https://docusaurus.io/). The easiest way to enhance this documentation is to use the hot-reloadable mode, where changes in the code are rapidly reflected in the locally hosted web browser pages.

```
git clone git@github.com:niivue/niivue.git
cd niivue
npm install
npm run build:niivue
npm run dev:docs
```

Note the embedded [JSDoc](https://jsdoc.app/) annotations that describe the API and include links to live demos are also also compiled by `build:niivue` into [web pages](./api/niivue/classes/Niivue#methods).

## Alternatives

What makes NiiVue unique is its ability to simultaneously display all major neuroimaging data types in the browser—including volumetric voxels, surface meshes, tractography streamlines, statistical overlays, and connectomes. This versatility makes it a strong candidate for integrated web-based visualization. However, before committing development resources to a single platform, it may be worth considering whether an alternative tool better suits your specific needs. Below are some alternative voxel-based web tools worth exploring:

 - [ami](https://fnndsc.github.io/ami/)
 - [BioImage Suite Web](https://bioimagesuiteweb.github.io/webapp/viewer.html)
 - [BrainBrowser](https://brainbrowser.cbrain.mcgill.ca/volume-viewer)
 - [nifti-drop](http://vsoch.github.io/nifti-drop)
 - [OHIF DICOM Viewer](https://viewer.ohif.org/)
 - [Papaya](https://www.fmrib.ox.ac.uk/ukbiobank/group_means/index.html)
 - [pycortex](https://github.com/gallantlab/pycortex)
 - [VTK.js](https://kitware.github.io/paraview-glance/app/)